<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>

        .clearfix:before,
        .clearfix:after {
            display: table;
            content: "";
        }

        .clearfix:after {
            clear: both
        }

        html,
        body,
        #app {
            height: 100%;
            min-width: 1366px;
        }

        .el-table__body-wrapper:: -o-scrollbar {
            display: none;
        }

        .el-table__body-wrapper:: -moz-scrollbar {
            display: none;
        }

        .el-table .warning-row {
            background: oldlace;
        }

        .el-table .success-row {
            background: #f0f9eb;
        }

        .el-table {
            position: relative;
        }

        .viewSendContentMsgBox {
            width: 45% !important;
            overflow-y: scroll !important;
            max-height: 80% !important;
        }

        .serviceCheckBox {
            width: 164px;
            margin-left: 0px !important;
        }

        .procKeyCheckBox {
            width: 195px;
            margin-left: 0px !important;
        }
    </style>
    <link type="text/css" rel="styleSheet" href="css/element-ui.css"/>
    <script src="js/vue.min.js" type="application/javascript"></script>
    <!--    <script src="/js/jquery.js" type="application/javascript"></script>-->
    <!--    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>-->
    <script src="js/axios.min.js"></script>
    <script src="js/element-ui.js" type="application/javascript"></script>
    <script src="common/common-js.js"></script>
    <script src="js/querystring.js"></script>
</head>
<body>
<div id="app">
    <el-card class="box-card">
        <div slot="header" class="clearfix">
            <el-tabs v-model="activeName" @tab-click="handleClick">

                <el-tab-pane label="开始对接" name="start">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.years" clearable placeholder="年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.months" clearable placeholder="月份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="10">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.accSets" clearable placeholder="账套号"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.batchSize" clearable placeholder="单次最多推多少条 默认1000"></el-input>
                                    </div>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col>
                                <div class="grid-content bg-purple" style="padding-top: 15px;padding-bottom: 15px;">
<!--                                        <el-select v-model="startParams.serviceCodes" placeholder="请选择数据对接类型">-->
<!--                                            <el-option label="全部" value=""></el-option>-->
<!--                                            <el-option label="账套数据" value="W01001"></el-option>-->
<!--                                            <el-option label="账套科目初始化" value="W01002"></el-option>-->
<!--                                            <el-option label="会计凭证数据" value="W01003"></el-option>-->
<!--                                            <el-option label="集体土地" value="W02005"></el-option>-->
<!--                                            <el-option label="无形资产" value="W02004"></el-option>-->
<!--                                            <el-option label="存货资产" value="W02003"></el-option>-->
<!--                                            <el-option label="生物资产" value="W02002"></el-option>-->
<!--                                            <el-option label="固定资产" value="W02001"></el-option>-->
<!--                                            <el-option label="固定资产-信息变更" value="W01006"></el-option>-->
<!--                                            <el-option label="固定资产-价值变动" value="W01007"></el-option>-->
<!--                                            <el-option label="固定资产-处置记录" value="W01008"></el-option>-->
<!--                                            <el-option label="固定资产-折旧记录" value="W01009"></el-option>-->
<!--                                            <el-option label="收支日记账" value="W04001"></el-option>-->
<!--                                            <el-option label="债权公布" value="W01012"></el-option>-->
<!--                                            <el-option label="债务公布" value="W01011"></el-option>-->
<!--                                            <el-option label="资产负债表" value="W01010"></el-option>-->
<!--                                            <el-option label="收益及收益分配表" value="WG01013"></el-option>-->
<!--                                            <el-option label="收入明细表" value="WG01014"></el-option>-->
<!--                                            <el-option label="支出明细表" value="WG01015"></el-option>-->
<!--                                            <el-option label="合同信息" value="W03001"></el-option>-->
<!--                                            <el-option label="账套月结" value="W01004"></el-option>-->
<!--                                            <el-option label="资产地图" value="W91001"></el-option>-->
<!--                                            <el-option label="经济组织地图定位" value="W92001"></el-option>-->
<!--                                            <el-option label="附件上传" value="DJ_FILE"></el-option>-->
<!--                                        </el-select>-->
<!--                                    <el-checkbox :indeterminate="isIndeterminateServiceCodes" v-model="checkAllServiceCodes" @change="handleCheckAllServicesChange">全选</el-checkbox>-->
                                    <el-checkbox :indeterminate="isIndeterminateServiceCodesCw" v-model="checkAllServiceCodesCw" @change="handleCheckAllServicesChangeCw">全选财务</el-checkbox>
                                    <div style="margin: 15px 0;"></div>
                                    <el-checkbox-group v-model="startParams.serviceCodes" @change="handleCheckedServicesChange">
                                        <el-checkbox label="" @change="handleCheckAllServicesChange_new" border class="serviceCheckBox" size="small">全部</el-checkbox>
                                        <el-checkbox v-for="service in allServices" :label="service.value" border class="serviceCheckBox" size="small">{{service.label}}</el-checkbox>
                                    </el-checkbox-group>
                                </div>
                                </el-col>
                            </el-row>
                            <el-row :gutter="12" style="margin-bottom: 10px;">
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-checkbox v-model="startParams.noCheck">是否跳过社会信用代码检验</el-checkbox>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-checkbox v-model="startParams.noCheckCanFlag">是否跳过账套canFlag校验</el-checkbox>
                                    </div>
                                </el-col>

                            </el-row>
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="20">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="startPushData()">推送数据</el-button>
                                    </div>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="10">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryTaskIdParams.taskIds" clearable placeholder="taskId号码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="4">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="queryTaskId()">查询taskId</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="20">
                                    <el-input
                                            type="textarea"
                                            :rows="5"
                                            placeholder="结果"
                                            v-model="queryTaskIdResult">
                                    </el-input>
                                </el-col>
                            </el-row>

                            <!-- 提示哪些账套过往年月有未对接数据 -->
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="20">
                                    <el-table
                                            :data="remainTableData"
                                            height="300"
                                            border
                                            style="width: 100%"
                                            :row-style="{color: 'red'}">
                                        <el-table-column
                                                prop="info"
                                                label="过往会计期间数据未对接提示">
                                        </el-table-column>
                                    </el-table>
                                    <el-pagination
                                            @size-change="handleRemainDataSizeChange"
                                            @current-change="handleRemainDataCurrentChange"
                                            :current-page="remainParams.current"
                                            :page-sizes="[30, 100, 200, 500, 1000]"
                                            :page-size="remainParams.size"
                                            layout="total, sizes, prev, pager, next, jumper"
                                            :total="remainDataTotal">
                                    </el-pagination>
                                </el-col>
                            </el-row>

                        </div>
                    </el-card>
                </el-tab-pane>

                <el-tab-pane label="生成数据" name="build">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col>
                                    <div class="grid-content bg-purple" style="padding-top: 15px;padding-bottom: 15px;">
                                        <!--el-checkbox-group v-model="buildParams.procKeys">
                                            <el-checkbox label="DZ_AUTO" border class="procKeyCheckBox" size="small">DZ_AUTO(年,月,accModal)</el-checkbox>
                                            <el-checkbox label="DZ_SPT" border class="procKeyCheckBox" size="small">DZ_SPT(年,月,accSet)</el-checkbox>
                                        </el-checkbox-group-->
                                        <el-radio v-model="buildParams.procKey" label="DZ_AUTO">DZ_AUTO</el-radio>
                                        <el-radio v-model="buildParams.procKey" label="DZ_SPT">DZ_SPT</el-radio>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="buildParams.years" clearable placeholder="年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="buildParams.months" clearable placeholder="月份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="10">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="buildParams.accSets" clearable placeholder="账套号"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="buildParams.accModal" clearable placeholder="acc_modal"></el-input>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-row>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="startExecBuildSql()">开始生成数据</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getBuildSqlData()">刷新执行情况</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <!-- 存储过程执行情况查看列表 -->
                            <el-table
                                    :data="buildSqlTableData"
                                    height="400"
                                    style="width: 100%">
                                <el-table-column
                                        prop="procType"
                                        label="存储过程类型"
                                        width="150">
                                </el-table-column>
                                <el-table-column
                                        prop="params"
                                        label="参数"
                                        width="200">
                                </el-table-column>
                                <el-table-column
                                        prop="status"
                                        width="120"
                                        label="执行状态">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.status == '1'">执行成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.status == '0'">执行中</el-tag>
                                        <el-tag type="danger" v-if="scope.row.status == '2'">执行异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.status == '9'">被中止</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="writeLog"
                                        label="日志信息"
                                        width="250"
                                        :show-overflow-tooltip="false">
                                </el-table-column>
                                <el-table-column
                                        prop="createDate"
                                        width="160"
                                        label="发送时间">
                                </el-table-column>
                                <el-table-column
                                        prop="writeDate"
                                        width="160"
                                        label="返回时间">
                                </el-table-column>

                                <el-table-column
                                        label="操作">
                                    <template slot-scope="scope">
                                        <el-button @click="viewSendContent(scope.row)" type="text" size="small">xxx</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleBuildSqlDataSizeChange"
                                    @current-change="handleBuildSqlDataCurrentChange"
                                    :current-page="buildParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="buildParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="buildSqlDataTotal">
                            </el-pagination>

                        </div>

                    </el-card>
                </el-tab-pane>

                <el-tab-pane label="统计表" name="statistics">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryStatisticsParams.creditCode" clearable @clear="getStatisticsData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryStatisticsParams.typeName" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="账套数据"></el-option>
                                            <el-option label="账套科目初始化" value="账套科目初始化"></el-option>
                                            <el-option label="会计凭证数据" value="会计凭证数据"></el-option>
                                            <el-option label="删除会计凭证" value="删除会计凭证"></el-option>
                                            <el-option label="集体土地" value="集体土地"></el-option>
                                            <el-option label="无形资产" value="无形资产"></el-option>
                                            <el-option label="存货资产" value="存货资产"></el-option>
                                            <el-option label="生物资产" value="生物资产"></el-option>
                                            <el-option label="固定资产" value="固定资产"></el-option>
                                            <el-option label="删除固定资产" value="删除固定资产"></el-option>
                                            <el-option label="固定资产-信息变更" value="固定资产-信息变更"></el-option>
                                            <el-option label="固定资产-价值变动" value="固定资产-价值变动"></el-option>
                                            <el-option label="固定资产-处置记录" value="固定资产-处置记录"></el-option>
                                            <el-option label="固定资产-折旧记录" value="固定资产-折旧记录"></el-option>
                                            <el-option label="收支日记账" value="收支日记账"></el-option>
                                            <el-option label="债权公布" value="债权公布"></el-option>
                                            <el-option label="债务公布" value="债务公布"></el-option>
                                            <el-option label="资产负债表" value="资产负债表"></el-option>
                                            <el-option label="合同信息" value="合同信息"></el-option>
                                            <el-option label="账套月结" value="账套月结"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getStatisticsData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allStatisticsData"
                                    :row-class-name="tableRowClassName"
                                    :row-style="{height:'30px'}" :cell-style="{padding: '0'}"
                                    style="width: 100%">
                                <el-table-column
                                        prop="typeName"
                                        label="对接数据类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="info1"
                                        label="应上报">
                                </el-table-column>
                                <el-table-column
                                        prop="info2"
                                        label="省平台入库">
                                </el-table-column>
                                <el-table-column
                                        prop="info3"
                                        label="全国平台校验成功">
                                </el-table-column>

                                <el-table-column
                                        width="260"
                                        label="对接情况">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="judgeAbutmentInfo(scope.row) === '1'">全国平台校验成功数较多(80%~99%)</el-tag>
                                        <el-tag type="warning" v-if="judgeAbutmentInfo(scope.row) === '2'">全国平台校验成功数一般(50%~80%)</el-tag>
                                        <el-tag type="danger" v-if="judgeAbutmentInfo(scope.row) === '3'">全国平台校验成功数较少(0%~50%)</el-tag>
                                        <el-tag type="danger" v-if="judgeAbutmentInfo(scope.row) === '4'">未生成推送数据</el-tag>
                                        <el-tag type="success" v-if="judgeAbutmentInfo(scope.row) === '5'">全国平台校验成功数全部完成</el-tag>
                                    </template>
                                </el-table-column>

                            </el-table>
                        </div>
                    </el-card>
                </el-tab-pane>


                <!--统计表-月份-->
                <el-tab-pane label="统计表-月份" name="statisticsMonths">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryStatisticsParams.creditCode" clearable @clear="getStatisticsMonthsData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryStatisticsParams.typeName" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="账套数据"></el-option>
                                            <el-option label="账套科目初始化" value="账套科目初始化"></el-option>
                                            <el-option label="会计凭证数据" value="会计凭证数据"></el-option>
                                            <el-option label="删除会计凭证" value="删除会计凭证"></el-option>
                                            <el-option label="集体土地" value="集体土地"></el-option>
                                            <el-option label="无形资产" value="无形资产"></el-option>
                                            <el-option label="存货资产" value="存货资产"></el-option>
                                            <el-option label="生物资产" value="生物资产"></el-option>
                                            <el-option label="固定资产" value="固定资产"></el-option>
                                            <el-option label="删除固定资产" value="删除固定资产"></el-option>
                                            <el-option label="固定资产-信息变更" value="固定资产-信息变更"></el-option>
                                            <el-option label="固定资产-价值变动" value="固定资产-价值变动"></el-option>
                                            <el-option label="固定资产-处置记录" value="固定资产-处置记录"></el-option>
                                            <el-option label="固定资产-折旧记录" value="固定资产-折旧记录"></el-option>
                                            <el-option label="收支日记账" value="收支日记账"></el-option>
                                            <el-option label="债权公布" value="债权公布"></el-option>
                                            <el-option label="债务公布" value="债务公布"></el-option>
                                            <el-option label="资产负债表" value="资产负债表"></el-option>
                                            <el-option label="合同信息" value="合同信息"></el-option>
                                            <el-option label="账套月结" value="账套月结"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryStatisticsParams.info" placeholder="请选择数据对接情况">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="应上报" value="应上报"></el-option>
                                            <el-option label="省平台入库" value="省平台入库"></el-option>
                                            <el-option label="全国平台校验成功" value="全国平台校验成功"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryStatisticsParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryStatisticsParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getStatisticsMonthsData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allStatisticsData"
                                    :row-class-name="tableRowClassName"
                                    :row-style="{height:'30px'}"
                                    :cell-style="{padding: '0'}"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="typeName"
                                        label="对接数据类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="info"
                                        label="对接情况"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="months1"
                                        label="一月">
                                </el-table-column>
                                <el-table-column
                                        prop="months2"
                                        label="二月">
                                </el-table-column>
                                <el-table-column
                                        prop="months3"
                                        label="三月">
                                </el-table-column>
                                <el-table-column
                                        prop="months4"
                                        label="四月">
                                </el-table-column>
                                <el-table-column
                                        prop="months5"
                                        label="五月">
                                </el-table-column>
                                <el-table-column
                                        prop="months6"
                                        label="六月">
                                </el-table-column>
                                <el-table-column
                                        prop="months7"
                                        label="七月">
                                </el-table-column>
                                <el-table-column
                                        prop="months8"
                                        label="八月">
                                </el-table-column>
                                <el-table-column
                                        prop="months9"
                                        label="九月">
                                </el-table-column>
                                <el-table-column
                                        prop="months10"
                                        label="十月">
                                </el-table-column>
                                <el-table-column
                                        prop="months11"
                                        label="十一月">
                                </el-table-column>
                                <el-table-column
                                        prop="months12"
                                        label="十二月">
                                </el-table-column>

                                <el-table-column
                                        prop="abutmentStatus"
                                        label="数据对接情况"
                                        width="250">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.abutmentStatus == '1'">全国平台校验成功数较多(80%~99%)</el-tag>
                                        <el-tag type="warning" v-if="scope.row.abutmentStatus == '2'">全国平台校验成功数一般(50%~80%)</el-tag>
                                        <el-tag type="danger" v-if="scope.row.abutmentStatus == '3'">全国平台校验成功数较少(0%~50%)</el-tag>
                                        <el-tag type="danger" v-if="scope.row.abutmentStatus == '4'">未生成推送数据</el-tag>
                                        <el-tag type="success" v-if="scope.row.abutmentStatus == '5'">全国平台校验成功数全部完成</el-tag>
                                        <el-tag type="danger" v-if="scope.row.abutmentStatus == '-1'">选择月份无情况</el-tag>
                                    </template>
                                </el-table-column>

                            </el-table>
                        </div>
                    </el-card>
                </el-tab-pane>

                <!--四无统计表-->
                <el-tab-pane label="四无统计表" name="statisticsTreeData">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-cascader v-model="queryStatisticsTreeDataParams.distNo" :props="distCascaderProps" placeholder="查询地区" :show-all-levels="false"></el-cascader>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryStatisticsTreeDataParams.years" clearable @clear="getTreeStatisticsData()" placeholder="查询年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getTreeStatisticsData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="exportExcelTreeStatisticsData()">导出Excel</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allStatisticsData"
                                    :row-class-name="tableRowClassName"
                                    :row-style="{height:'30px'}" :cell-style="{padding: '0'}"
                                    style="width: 100%">
                                <el-table-column
                                        prop="distName"
                                        label="地区名称"
                                        width="250">
                                </el-table-column>
                                <el-table-column label="建账套组织数">
                                    <el-table-column
                                            prop="zt_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zt_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zt_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zt_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>

                                <el-table-column
                                        label="建凭证组织数">
                                    <el-table-column
                                            prop="pz_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="pz_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="pz_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="pz_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="建资产组织数">
                                    <el-table-column
                                            prop="zc_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zc_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zc_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zc_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="建合同组织数">
                                    <el-table-column
                                            prop="ht_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="ht_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="ht_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="ht_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无凭证组织数">
                                    <el-table-column
                                            prop="no_pz_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_pz_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_pz_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_pz_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无资产组织数">
                                    <el-table-column
                                            prop="no_zc_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_zc_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_zc_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_zc_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无合同组织数">
                                    <el-table-column
                                            prop="no_ht_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ht_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ht_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ht_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无存款组织数">
                                    <el-table-column
                                            prop="no_ck_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ck_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ck_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ck_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="四无组织数">
                                    <el-table-column
                                            prop="no_4_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_4_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_4_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_4_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>


                            </el-table>
                        </div>
                    </el-card>
                </el-tab-pane>


                <!--账套信息-->
                <el-tab-pane label="账套信息" name="accSet">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.accSet" clearable @clear="getAllData()" placeholder="查询账套号"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <!--                                <el-col :span="3">-->
                                <!--                                    <div class="grid-content bg-purple">-->
                                <!--                                        <el-button type="primary" @click="tryPutData()">重新推送数据</el-button>-->
                                <!--                                    </div>-->
                                <!--                                </el-col>-->
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="accSet"
                                        label="账套号"
                                        width="70">
                                </el-table-column>
                                <el-table-column
                                        prop="DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="MC"
                                        label="账套名称"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="TYSHXYDM"
                                        label="统一社会信用代码"
                                        width="180">
                                </el-table-column>
                                <!--                                <el-table-column-->
                                <!--                                        prop="sjjhbz"-->
                                <!--                                        width="180"-->
                                <!--                                        label="数据交换标志">-->
                                <!--                                    <template v-slot="scope">-->
                                <!--                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">采集完成</el-tag>-->
                                <!--                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">待采集</el-tag>-->
                                <!--                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '-1'">采集失败</el-tag>-->
                                <!--                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '-2'">等待重试</el-tag>-->
                                <!--                                    </template>-->
                                <!--                                </el-table-column>-->
                                <el-table-column
                                        prop="QY_RQ"
                                        label="账套启用期间">
                                </el-table-column>
                                <el-table-column
                                        prop="TY_RQ"
                                        label="账套停用期间">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="260"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        width="180"
                                        label="任务id">
                                </el-table-column>

                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                            <!--<div style="margin-top: 20px">
                                <el-button @click="pushMassage()">切换第二、第三行的选中状态</el-button>
                                <el-button @click="manualCollectData()" type="primary">手动采集数据</el-button>
                            </div>-->
                        </div>
                    </el-card>
                </el-tab-pane>



                <!--账套科目-->
                <el-tab-pane label="账套科目" name="accCode">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <!--                                <el-col :span="3">-->
                                <!--                                    <div class="grid-content bg-purple">-->
                                <!--                                        <el-button type="primary" @click="tryPutData()">重新推送数据</el-button>-->
                                <!--                                    </div>-->
                                <!--                                </el-col>-->
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="ZT_DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="NF"
                                        label="年份">
                                </el-table-column>
                                <el-table-column
                                        prop="BM"
                                        label="科目编码">
                                </el-table-column>
                                <el-table-column
                                        prop="MC"
                                        label="科目名称">
                                </el-table-column>
                                <el-table-column
                                        prop="YEFX"
                                        label="科目余额方向">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">借方</el-tag>
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '2'">贷方</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        label="任务id">
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                        </div>
                    </el-card>
                </el-tab-pane>



                <!--会计凭证-->
                <el-tab-pane label="会计凭证" name="voucher">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="setToNeedDuijie()">设置为待推送</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    ref="voucher"
                                    height="700">
                                <el-table-column
                                        type="selection"
                                        width="55">
                                </el-table-column>
                                <el-table-column
                                        prop="ZT_DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="DATA_KEY"
                                        label="凭证唯一标识">
                                </el-table-column>
                                <el-table-column
                                        prop="PZXH"
                                        label="凭证序号">
                                </el-table-column>
                                <el-table-column
                                        prop="PZRQ"
                                        label="凭证日期">
                                </el-table-column>
                                <el-table-column
                                        prop="ZT"
                                        label="凭证状态">
                                    <template v-slot="scope">
                                        <el-tag type="warning" v-if="scope.row.ZT == '10'">待提交</el-tag>
                                        <el-tag type="warning" v-if="scope.row.ZT == '20'">待审核</el-tag>
                                        <el-tag type="danger" v-if="scope.row.ZT == '30'">已驳回</el-tag>
                                        <el-tag type="warning" v-if="scope.row.ZT == '40'">已审核</el-tag>
                                        <el-tag type="success" v-if="scope.row.ZT == '50'">已入账</el-tag>
                                        <el-tag type="danger" v-if="scope.row.ZT == '60'">已冲销</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="260"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        label="任务id">
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                        </div>
                    </el-card>
                </el-tab-pane>


                <!--账套月结-->
                <el-tab-pane label="账套月结" name="settlement">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.years" placeholder="输入年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.months" placeholder="输入月份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="setToNeedDuijie()">设置为待推送</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    ref="settlement"
                                    height="700">
                                <el-table-column
                                        type="selection"
                                        width="55">
                                </el-table-column>
                                <el-table-column
                                        prop="ZT_DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="TYSHXYDM"
                                        label="统一社会信用代码">
                                </el-table-column>
                                <el-table-column
                                        prop="KJQJ"
                                        label="月结的会计期间">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="260"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        label="任务id">
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                        </div>
                    </el-card>
                </el-tab-pane>

                <el-tab-pane label="任务详情" name="duijie_async">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="duijieAsyncParams.taskId" clearable @clear="getDuijieAsyncData()" placeholder="查询taskId"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="duijieAsyncParams.creditCode" clearable @clear="getDuijieAsyncData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="duijieAsyncParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="duijieAsyncParams.serviceCode" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option v-for="service in allServices" :label="service.label" :value="service.value"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getDuijieAsyncData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allDuijieAsyncData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="taskId"
                                        label="任务id"
                                        width="180">
                                </el-table-column>
                                <el-table-column
                                        prop="type"
                                        label="类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="120"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="writeLog"
                                        label="日志信息"
                                        width="800"
                                        :show-overflow-tooltip="false">
                                </el-table-column>
                                <el-table-column
                                        prop="createDate"
                                        width="160"
                                        label="发送时间">
                                </el-table-column>
                                <el-table-column
                                        prop="writeDate"
                                        width="160"
                                        label="返回时间">
                                </el-table-column>

                                <el-table-column
                                        label="操作">
                                    <template slot-scope="scope">
                                        <el-button @click="viewSendContent(scope.row)" type="text" size="small">查看报文</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleDuijieAsyncDataSizeChange"
                                    @current-change="handleDuijieAsyncDataCurrentChange"
                                    :current-page="duijieAsyncParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="duijieAsyncParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="duijieAsyncDataTotal">
                            </el-pagination>
                            <!--<div style="margin-top: 20px">
                                <el-button @click="pushMassage()">切换第二、第三行的选中状态</el-button>
                                <el-button @click="manualCollectData()" type="primary">手动采集数据</el-button>
                            </div>-->
                        </div>
                    </el-card>
                </el-tab-pane>


                <el-tab-pane label="未处理失败信息" name="fail">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="failParams.creditCode" clearable @clear="getFailData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <!--                                <el-col :span="3">-->
                                <!--                                    <div class="grid-content bg-purple">-->
                                <!--                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">-->
                                <!--                                            <el-option label="全部" value=""></el-option>-->
                                <!--                                            <el-option label="对接成功" value="1"></el-option>-->
                                <!--                                            <el-option label="等待对接" value="0"></el-option>-->
                                <!--                                            <el-option label="对接异常" value="2"></el-option>-->
                                <!--                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>-->
                                <!--                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>-->
                                <!--                                        </el-select>-->
                                <!--                                    </div>-->
                                <!--                                </el-col>-->
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="failParams.serviceCode" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option v-for="service in allServices" :label="service.label" :value="service.value"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getFailData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allFailData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="taskId"
                                        label="任务id"
                                        width="180">
                                </el-table-column>
                                <el-table-column
                                        prop="type"
                                        label="类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="180"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="writeLog"
                                        label="错误信息"
                                        width="800">
                                </el-table-column>
                                <el-table-column
                                        prop="createDate"
                                        label="发送时间">
                                </el-table-column>
                                <el-table-column
                                        prop="writeDate"
                                        label="返回时间">
                                </el-table-column>

                                <!--                                <el-table-column-->
                                <!--                                        label="操作"-->
                                <!--                                        width="100">-->
                                <!--                                    <template slot-scope="scope">-->
                                <!--                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>-->
                                <!--                                    </template>-->
                                <!--                                </el-table-column>-->
                            </el-table>
                            <el-pagination
                                    @size-change="handleFailDataSizeChange"
                                    @current-change="handleFailDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allFailDataTotal">
                            </el-pagination>
                            <!--<div style="margin-top: 20px">
                                <el-button @click="pushMassage()">切换第二、第三行的选中状态</el-button>
                                <el-button @click="manualCollectData()" type="primary">手动采集数据</el-button>
                            </div>-->
                        </div>
                    </el-card>
                </el-tab-pane>




            </el-tabs>
        </div>
    </el-card>

</div>
</body>


<script>
    // 所有接口的service
    const allServices = [
        {label: "账套数据", value: "W01001", isCw: true},
        {label: "账套科目初始化", value: "W01002", isCw: true},
        {label: "会计凭证数据", value: "W01003", isCw: true},
        {label: "集体土地", value: "W02005"},
        {label: "无形资产", value: "W02004"},
        {label: "存货资产", value: "W02003"},
        {label: "生物资产", value: "W02002"},
        {label: "固定资产", value: "W02001"},
        {label: "固定资产-信息变更", value: "W01006"},
        {label: "固定资产-价值变动", value: "W01007"},
        {label: "固定资产-处置记录", value: "W01008"},
        {label: "固定资产-折旧记录", value: "W01009"},
        {label: "收支日记账", value: "W04001", isCw: true},
        {label: "债权公布", value: "W01012", isCw: true},
        {label: "债务公布", value: "W01011", isCw: true},
        {label: "资产负债表", value: "W01010", isCw: true},
        {label: "收益及收益分配表", value: "WG01013", isCw: true},
        {label: "收入明细表", value: "WG01014", isCw: true},
        {label: "支出明细表", value: "WG01015", isCw: true},
        {label: "合同信息", value: "W03001"},
        {label: "账套月结", value: "W01004", isCw: true},
        {label: "资产地图", value: "W91001"},
        {label: "经济组织地图定位", value: "W92001"},
        {label: "附件上传", value: "DJ_FILE"}
    ];
    const allServiceCodes = [], allCwServiceCodes = [];
    for (const index in allServices) {
        allServiceCodes.push(allServices[index].value);
        if (allServices[index].isCw) {
            allCwServiceCodes.push(allServices[index].value);
        }
    }

    var vue = new Vue({
        el: '#app',
        data() {
            return {
                addDialog: false,
                // ws是否启动
                wsIsRun: false,
                // 定义ws对象
                webSocket: null,
                // ws请求链接（类似于ws后台地址）
                ws: '',
                // ws定时器
                wsTimer: null,
                currentCollectData: [],
                allData: [],
                activeName: 'start',
                startParams: {
                    years: '',
                    months: '',
                    accSets: '',
                    serviceCodes: [''],
                    noCheck: false,
                    noCheckCanFlag: false,
                    batchSize: ''
                },
                allServices: allServices,
                // 首页多选接口
                isIndeterminateServiceCodes: false,
                checkAllServiceCodes: false,
                isIndeterminateServiceCodesCw: false,
                checkAllServiceCodesCw: false,
                queryTaskIdParams: {
                    taskIds: ''
                },
                queryTaskIdResult: '',
                // 获取未对接的数据
                remainParams: {
                    current: 1,
                    size: 30
                },
                remainDataTotal: 0,
                remainTableData: [],
                queryParams: {
                    creditCode: '',
                    opType: '',
                    years: '',
                    months: '',
                    serviceCode: 'W01001',
                    sjjhbz: '',
                    accSet: '',
                    current: 1,
                    size: 30
                },
                allDataTotal: 0,
                queryStatisticsParams: {
                    creditCode: '',
                    years: '',
                    months: '',
                    typeName: '',
                    info: ''
                },
                // 树形地区四无统计表
                queryStatisticsTreeDataParams: {
                    distNo: '',
                    years: '2024'
                },
                distCascaderProps: {
                    lazy: true,
                    checkStrictly: true,
                    expandTrigger: 'hover',
                    lazyLoad (node, resolve) {
                        const { level } = node;
                        if (level <= 1) {
                            const distNo = node.value === undefined ? "" : node.value;
                            axios.get("/query/dist", {params: {distNo: distNo, level: level}}).then((res) => {
                                let nodes = res.data.data;
                                resolve(nodes);
                            })
                        } else {
                            resolve([]);
                        }
                    }
                },
                allStatisticsData: [],
                duijieAsyncParams: {
                    creditCode: '',
                    serviceCode: '',
                    sjjhbz: '',
                    taskId: '',
                    current: 1,
                    size: 30
                },
                failParams: {
                    creditCode: '',
                    serviceCode: '',
                    sjjhbz: '',
                    current: 1,
                    size: 30
                },
                testEnvParams: {
                    activeTab: 'testEnv',
                    creditCode: '',
                    opType: '1',
                    serviceCode: '',
                    customServiceCode: '',
                    content: '',
                    fileList: [],
                },
                allFailData: [],
                allFailDataTotal: 0,
                duijieAsyncDataTotal: 0,
                allDuijieAsyncData: [],
                buildParams: {
                    years: '',
                    months: '',
                    accSets: '',
                    accModal: '',
                    procKey: '',
                    procKeys: [],
                    current: 1,
                    size: 30
                },
                buildSqlTableData: [],
                buildSqlDataTotal: 0,
                saveTypeName: '',
                currentRowColor: '',
                typeNameToColorMap: {},
                currentTabName: ''
            }
        },
        async mounted() {
            // this.wsIsRun = true
            // this.initWs()
            this.getRemainData();
        },
        methods: {
            //菜单改变事件
            handleClick(tab, event) {
                this.currentTabName = tab.name;
                this.queryParams = {
                    creditCode: '',
                    opType: '',
                    years: '',
                    months: '',
                    serviceCode: 'W01001',
                    sjjhbz: '',
                    current: 1,
                    size: 30
                }

                if (tab.name === "statisticsMonths") {
                    this.getStatisticsMonthsData()
                } else if (tab.name === "statistics") {
                    this.getStatisticsData()
                } else if (tab.name === "statisticsTreeData") {
                    this.getTreeStatisticsData()
                } else if (tab.name === "duijie_async") {
                    this.getDuijieAsyncData()
                } else if (tab.name === "fail") {
                    this.getFailData()
                } else if (tab.name === "start") {
                    // 开始对接页面 不用获取数据
                } else if (tab.name === "build") {
                    this.getBuildSqlData();
                } else {
                    // 各张基础数据表的
                    this.queryParams.serviceCode = this.getServiceCodeByTabName(tab.name);
                    this.getAllData();
                }
            },

            getServiceCodeByTabName(tabName) {
                if (tabName === "accSet") {
                    return "W01001";
                } else if (tabName === "accCode") {
                    return "W01002";
                } else if (tabName === "voucher") {
                    return "W01003";
                } else if (tabName === "settlement") {
                    return "W01004";
                }
            },
            // 首页接口全选、选择变化后的触发方法
            // handleCheckAllServicesChange (val) {
            //     this.startParams.serviceCodes = val ? allServiceCodes : [];
            //     this.isIndeterminateServiceCodes = false;
            //     this.isIndeterminateServiceCodesCw = false;
            //
            //     this.handleCheckedServicesChangeCw(this.startParams.serviceCodes);
            // },
            // 改成要么只选一个“全部” 要么单独选接口
            handleCheckAllServicesChange_new (val) {
                if (val) {
                    // 如果选了全部 则其他接口的勾选取消
                    this.startParams.serviceCodes = [""];
                }
            },
            handleCheckedServicesChange(value) {
                // let checkedCount = value.length;
                // this.checkAllServiceCodes = checkedCount === this.allServices.length;
                // this.isIndeterminateServiceCodes = checkedCount > 0 && checkedCount < this.allServices.length;

                // 如果单独选了接口 则去掉“全部”的勾选
                let isSelectedOtherService = false;
                for (const index in value) {
                    if (value[index] != "") {
                        isSelectedOtherService = true;
                    }
                }
                if (isSelectedOtherService) {
                    this.startParams.serviceCodes = this.startParams.serviceCodes.filter(function(value) {
                        return value != "";
                    })
                }

                this.handleCheckedServicesChangeCw(value);
            },
            handleCheckAllServicesChangeCw (val) {
                this.startParams.serviceCodes = val ? allCwServiceCodes : [];
                this.isIndeterminateServiceCodesCw = false;
                this.isIndeterminateServiceCodes = val;
            },
            handleCheckedServicesChangeCw(value) {
                // 财务的
                let checkedCountCw = 0;
                // 判断财务接口选中了多少个
                for (const index in value) {
                    if (allCwServiceCodes.includes(value[index])) {
                        checkedCountCw ++;
                    }
                }
                this.checkAllServiceCodesCw = checkedCountCw === allCwServiceCodes.length;
                this.isIndeterminateServiceCodesCw = checkedCountCw > 0 && checkedCountCw < allCwServiceCodes.length;
            },

            async queryTaskStatus(row) {
                let taskId = row.taskId

                const {data} = await axios.get('duijie/queryTaskFromTaskId', {params: {"taskIds": taskId}})

                console.log(data)

                let message = '暂时未入省平台数据库，无返回结果信息！';
                let taskState = 0
                let type = 'info';

                if (data.data.length > 0) {
                    message = data.data[0].message;
                    taskState = data.data[0].taskState;
                }

                if (taskState === 0 || taskState === 1) {
                    type = 'info';
                } else if (taskState === 2) {
                    type = 'warning';
                } else if (taskState === 3) {
                    type = 'success';
                } else {
                    type = 'error';
                }



                // this.$message({
                //     dangerouslyUseHTMLString: true,
                //     message: '' +
                //         '<strong>返回结果状态: <i>' + message + '</i> </strong></br>' +
                //         '<strong>返回结果信息: <i>' + taskState + '</i> </strong></br>',
                //     type: type
                // });

                const h = this.$createElement;
                this.$msgbox({
                    title: '返回结果',
                    message: h('p', null, [
                        h('span', null, '返回结果状态 '),
                        h('i', { style: 'color: teal' }, taskState),
                        h('br', null, null),
                        h('span', null, '返回结果信息'),
                        h('i', { style: 'color: teal' }, message),
                    ]),
                    showCancelButton: true,
                    confirmButtonText: '确定',
                    // cancelButtonText: '取消',
                    beforeClose: (action, instance, done) => {
                        done();
                    }
                }).then(action => {
                });
            },
            //获取所有采集数据
            async getAllData() {
                const {data} = await axios.get('query/getBaseDuijieData', {params: this.queryParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                var parse = JSON.parse(data.data);
                this.allDataTotal = parse.total
                this.allData = parse.data
            },
            handleAllDataSizeChange(val) {
                this.queryParams.size = val;
                this.getAllData();
            },
            handleAllDataCurrentChange(val) {
                this.queryParams.current = val;
                this.getAllData();
            },
            handleDuijieAsyncDataSizeChange(val) {
                this.duijieAsyncParams.size = val;
                this.getDuijieAsyncData();
            },
            handleDuijieAsyncDataCurrentChange(val) {
                this.duijieAsyncParams.current = val;
                this.getDuijieAsyncData();
            },
            handleFailDataSizeChange(val) {
                this.failParams.size = val;
                this.getFailData();
            },
            handleFailDataCurrentChange(val) {
                this.failParams.current = val;
                this.getFailData();
            },
            handleRemainDataSizeChange(val) {
                this.remainParams.size = val;
                this.getRemainData();
            },
            handleRemainDataCurrentChange(val) {
                this.remainParams.current = val;
                this.getRemainData();
            },
            handleBuildSqlDataSizeChange(val) {
                this.buildParams.size = val;
                this.getBuildSqlData();
            },
            handleBuildSqlDataCurrentChange(val) {
                this.buildParams.current = val;
                this.getBuildSqlData();
            },

            async tryPutData() {

                const {data} = await axios.get('duijie/start', {params: {serviceCode: this.queryParams.serviceCode}})

                if (data.code === 200) {
                    this.$message({
                        message: data.message,
                        type: 'success'
                    });
                }

            },

            async queryTaskId() {

                const {data} = await axios.get('duijie/queryTaskFromTaskId', {params: this.queryTaskIdParams})

                if (data.code === 200) {
                    this.queryTaskIdResult = JSON.stringify(data);
                } else {
                    this.$message({
                        message: data,
                        type: 'error'
                    });
                }

            },

            async startPushData() {

                // const {data} = await axios.get('duijie/start', {params: this.startParams})
                const {data} = await axios.get('duijie/start?' + stringify(this.startParams));

                if (data.code === 200) {
                    this.$message({
                        message: data.data,
                        type: 'success'
                    });
                } else {
                    this.$message({
                        message: data,
                        type: 'error'
                    });
                }

            },


            //获取统计表信息-月份
            async getStatisticsMonthsData() {
                const {data} = await axios.get('query/getStatisticsMonthsData', {params: this.queryStatisticsParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.allStatisticsData = data.data
            },

            //获取统计表信息
            async getStatisticsData() {
                const {data} = await axios.get('query/getStatisticsData', {params: this.queryStatisticsParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.allStatisticsData = data.data
            },

            //获取统计表信息-四无
            async getTreeStatisticsData() {
                const {data} = await axios.get('query/getTreeStatisticsData', {params: this.getqueryStatisticsTreeDataParams()})
                this.allStatisticsData = data.data
            },

            getqueryStatisticsTreeDataParams() {
                return {distNo: this.queryStatisticsTreeDataParams.distNo[this.queryStatisticsTreeDataParams.distNo.length-1],
                        years: this.queryStatisticsTreeDataParams.years};
            },

            exportExcelTreeStatisticsData() {
                let params = this.getqueryStatisticsTreeDataParams();
                window.open("query/exportTreeStatisticsData?distNo=" + (params.distNo === undefined ? "" : params.distNo) + "&years=" + params.years, "_blank");
            },

            //判断对接的情况
            judgeAbutmentInfo(row) {
                var needAbutment = row.info1;
                var successAbutment = row.info3;


                if (needAbutment <= 0) {
                    return '4';
                }

                if (needAbutment == successAbutment) {
                    return '5';
                }

                if (successAbutment <= needAbutment * 0.5) {
                    return '3';
                }

                if (successAbutment > needAbutment * 0.5 && successAbutment < needAbutment * 0.8) {
                    return '2';
                }

                if (successAbutment > needAbutment * 0.8) {
                    return '1';
                }
            },


            getColorForTypeName(typeName) {
                // 如果typeName已经在map中，则返回对应的颜色
                if (typeName in this.typeNameToColorMap) {
                    return this.typeNameToColorMap[typeName];
                }

                // 否则，为typeName分配一个新的颜色，并存储到map中
                // 这里使用'warning-row'和'success-row'两个颜色交替分配
                const newColor = Object.keys(this.typeNameToColorMap).length % 2 === 0 ? 'warning-row' : 'success-row';
                this.typeNameToColorMap[typeName] = newColor;
                return newColor;
            },


            tableRowClassName({row, rowIndex}) {

                // 获取当前行的typeName
                const typeName = row.typeName;

                // 根据typeName获取颜色
                const color = this.getColorForTypeName(typeName);

                // 打印typeName，用于调试（可选）
                console.log(typeName);

                // 返回对应的颜色类名
                return color;

            },

            async getDuijieAsyncData() {
                const {data} = await axios.get('query/getDuijieAsyncData', {params: this.duijieAsyncParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.duijieAsyncDataTotal = data.data.total
                this.allDuijieAsyncData = data.data.data
            },

            //获取失败信息
            async getFailData() {
                const {data} = await axios.get('query/getFailDetailData', {params: this.failParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.allFailData = data.data.data;
                this.allFailDataTotal = data.data.total;
            },

            //获取未对接信息
            async getRemainData() {
                const {data} = await axios.get('query/getRemainData', {params: this.remainParams})
                let remainTableData = [];
                for (let i = 0; i<data.data.data.length; i++) {
                    let remainData = data.data.data[i];
                    let info = "账套[" + remainData.zt + "]存在会计区间[" + remainData.SSQJ + "]的财务数据未对接！请补充对接！";
                    remainTableData.push({"info": info})
                }
                this.remainTableData = remainTableData;
                this.remainDataTotal = data.data.total;
            },

            // 获取数据生成存储过程执行状态信息
            async getBuildSqlData() {
                const {data} = await axios.get('duijie/getBuildSqlData', {params: this.buildParams})
                this.buildSqlTableData = data.data.data;
                this.buildSqlDataTotal = data.data.total;
            },

            // 开始执行生成数据的存储过程
            async startExecBuildSql() {
                let args = [];
                // for (let i = 0; i < this.buildParams.procKeys.length; i++) {
                //     let procKey = this.buildParams.procKeys[i];
                    let procKey = this.buildParams.procKey;
                    if (procKey === 'DZ_AUTO') {
                        args = [this.buildParams.years, this.buildParams.months, this.buildParams.accModal];
                    } else if (procKey === 'DZ_SPT') {
                        args = [this.buildParams.years, this.buildParams.months, this.buildParams.accSets];
                    } else {
                        this.$message({message: "未选择存储过程！", type: 'error'});
                        return;
                    }
                // }

                const {data} = await axios.get('duijie/build?' + stringify({
                    procKey: this.buildParams.procKey,
                    args: args
                }));

                if (data.code === 200) {
                    this.$message({
                        message: data.message,
                        type: 'success'
                    });
                    await this.getBuildSqlData();
                } else {
                    this.$message({
                        message: data,
                        type: 'error'
                    });
                }
            },

            // 设置选中数据为待推送数据
            async setToNeedDuijie() {
                let tabName = this.currentTabName;
                let ids = '';
                let selectionRows = this.$refs[tabName].selection;
                selectionRows.forEach(row => {
                    if (ids) ids += ",";
                    ids += row.id;
                });

                const {data} = await axios.get('duijie/updateSjjhbzByIds', {params: {serviceCode: this.getServiceCodeByTabName(tabName), ids: ids, opType: 1}})
                await this.getAllData();
                this.$message({
                    message: data,
                    type: data.code === 200 ? 'success' : 'error'
                });
            },

            viewSendContent(row) {
                let content = row.content;

                const h = this.$createElement;
                this.$msgbox({
                    title: '发送报文',
                    message: h('p', { style: 'word-wrap: break-word'}, content),
                    showCancelButton: true,
                    confirmButtonText: '确定',
                    customClass: 'viewSendContentMsgBox'
                });
            },

        },
        filters: {
            dataFilter(date) {
                var unixTimestamp = new Date(date);
                var commonTime = unixTimestamp.toLocaleString();
                return commonTime;
            }
        },
        created() {
        }
    })

</script>

<script>
</script>
</body>
</html>